<html>
<body>
<h2>Simple Calculator</h2>




<form action="secondServlet" method="post">
	A: <input type="text" name="a"/> <br/>
	B: <input type="text" name="b"/> <br/>
	<input type="submit" name="action" value="+"/>
	<input type="submit" name="action" value="-"/>
	<input type="submit" name="action" value="*"/>
	<input type="submit" name="action" value="/"/>
</form>

<%

	Double value = (Double) request.getAttribute("result");

 	if(value!=null){
 		
%>
	Result: <input type="text" value="<%=value%>"/>
<%
 	}

%>
</body>
</html>
